﻿namespace HRM.CORE
{
    using DevExpress.Data;
    using DevExpress.Utils;
    using DevExpress.XtraBars;
    using DevExpress.XtraBars.Docking;
    using DevExpress.XtraEditors;
    using DevExpress.XtraEditors.Controls;
    using DevExpress.XtraEditors.Repository;
    using DevExpress.XtraGrid;
    using DevExpress.XtraGrid.Columns;
    using DevExpress.XtraGrid.Views.BandedGrid;
    using DevExpress.XtraGrid.Views.Base;
    using DevExpress.XtraGrid.Views.Grid;
    using APP.HELPER;
    using Common.Base;
    using Common.Class; using APP.HELPER.Utils.Language; using Security.Security; using Dictionary.ERP;
    using HRM.CORE;
    using HRM.CORE.REPORT;
    
    
    using System; using Extra.ERP;
    using System.ComponentModel;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms; using Common;
    using Extra.ERP;
    using Security.ERP;
    using Common;

    public class xucTimekeeperTotal : Common.xucBase
    {
        private Bar bar1;
        private BarButtonItem barButtonItem3;
        private BarDockControl barDockControlBottom;
        private BarDockControl barDockControlLeft;
        private BarDockControl barDockControlRight;
        private BarDockControl barDockControlTop;
        private BarManager barManager1;
        private BarEditItem bbeTimeKeeperTableListName;
        private BarEditItem bbeYear;
        private BarButtonItem bbiClose;
        private BarButtonItem bbiExport;
        private BarButtonItem bbiFinish;
        private BarButtonItem bbiLock;
        private BarButtonItem bbiOpen;
        private BarButtonItem bbiPrint;
        private BarButtonItem bbiReload;
        private BarButtonItem bbiSave;
        private BarButtonItem bbiTotal;
        private Common.Class.clsAllOption clsAllOption = new Common.Class.clsAllOption();
        private BandedGridColumn colAbsentL;
        private BandedGridColumn colAbsentWOL;
        private BandedGridColumn colBranchName;
        private BandedGridColumn colClockingError;
        private BandedGridColumn colClockingErrorBegin;
        private BandedGridColumn colClockingErrorEnd;
        private BandedGridColumn colCompensationDay;
        private BandedGridColumn colDepartmentName;
        private BandedGridColumn colDescription;
        private BandedGridColumn colEarlyMinute;
        private BandedGridColumn colEmployeeCode;
        private BandedGridColumn colExtraHour;
        private BandedGridColumn colFirstName;
        private BandedGridColumn colFurloughDay;
        private BandedGridColumn colGroupName;
        private BandedGridColumn colLastName;
        private BandedGridColumn colLateMinute;
        private BandedGridColumn colNightDutyDay;
        private BandedGridColumn colNightHour;
        private BandedGridColumn colOvertime150;
        private BandedGridColumn colOvertime195;
        private BandedGridColumn colOvertime200;
        private BandedGridColumn colOvertime260;
        private BandedGridColumn colOvertime300;
        private BandedGridColumn colOvertime390;
        private BandedGridColumn colOvertimeTotal1;
        private BandedGridColumn colPrivateHour;
        private BandedGridColumn colRealDay;
        private BandedGridColumn colRegulationDay;
        private BandedGridColumn colStipulatedDay;
        private BandedGridColumn colStipulatedTime;
        private BandedGridColumn colTotalHour;
        private BandedGridColumn colWorkTotal;
        private IContainer components = null;
        private DockManager dockManager1;
        private DockPanel dockPanel1;
        private ControlContainer dockPanel1_Container;
        private FlowLayoutPanel flowLayoutPanel1;
        private FlowLayoutPanel flowLayoutPanel2;
        private FlowLayoutPanel flowLayoutPanel3;
        private BandedGridView gbList;
        private GridControl gcList;
        private GridBand gridBand1;
        private GridBand gridBand2;
        private GridBand gridBand3;
        private GridBand gridBand4;
        private GridBand gridBand5;
        private GridBand gridBand6;
        private GridBand gridBand7;
        private GridColumn gridColumn1;
        private AutoHideContainer hideContainerLeft;
        public DevExpress.Utils.ImageCollection imageCollection2;
        private LabelControl lbBranchName;
        private LabelControl lbCompanyName;
        private LabelControl lbDepartmentName;
        private LabelControl lbGroupName;
        private LabelControl lbMessage;
        private LabelControl lbTimeKeeperOverTimeName;
        private string m_Code = MyLogin.Code;
        private string m_CompanyName = "";
        private System.DateTime m_Date;
        private string m_EmployeeCode = "";
        private bool m_IsFinish = false;
        private bool m_IsLock = false;
        private int m_Level = MyLogin.Level;
        private int m_Month = 0;
        private Guid m_TimeKeeperTableListID = Guid.Empty;
        private int m_Year = 0;
        private PanelControl panelControl1;
        private PictureBox ptFinish;
        private PictureBox ptLock;
        private RepositoryItemCalcEdit repCal;
        private GridView repositoryItemGridLookUpEdit2View;
        private RepositoryItemGridLookUpEdit repTimeKeeperList;
        private RepositoryItemTimeEdit repYear;
        private xucExpandCollapseButton xucExpandCollapseButton1;
        private xucOrganization xucOrganization1;

        public event ClosedHandler Closed;

        public event TimekeeperTableDeletedHandler TimekeeperTableDeleted;

        public event TimekeeperTableInsertedHandler TimekeeperTableInserted;

        public event UnShiftDataHandler UnShiftData;

        public xucTimekeeperTotal()
        {
            this.InitializeComponent();
            base.RestoreLayout(this.gbList, this);
            this.Init();
        }

        private void bbeYear_EditValueChanged(object sender, EventArgs e)
        {
            try
            {
                this.m_Year = Convert.ToDateTime(this.bbeYear.EditValue.ToString()).Year;
                this.LoadTimeKeeperTableList();
            }
            catch
            {
            }
        }

        private void bbiClose_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.RaiseClosedHandler();
        }

        private void bbiExport_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!MyRule.IsExport("bbiTimekeeperTotal"))
            {
                MyRule.Notify();
            }
            else
            {
                base._exportView = this.gbList;
                SYS_LOG.Insert("Bảng Chấm C\x00f4ng Tăng Ca", "Xuất");
                base.Export();
            }
        }

        private void bbiFinish_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!ClsOption.System2.IsQuestion || (XtraMessageBox.Show("Bạn c\x00f3 chắc l\x00e0 muốn thực hiện t\x00e1c vụ n\x00e0y kh\x00f4ng?" + Environment.NewLine + " T\x00e1c vụ n\x00e0y được hiểu l\x00e0 bạn đ\x00e3 ho\x00e0n th\x00e0nh bảng chấm c\x00f4ng của th\x00e1ng n\x00e0y!", "Th\x00f4ng b\x00e1o", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.No))
            {
                HRM_TIMEKEEPER_TABLELIST hrm_timekeeper_tablelist = new HRM_TIMEKEEPER_TABLELIST();
                if (hrm_timekeeper_tablelist.Finish(this.m_TimeKeeperTableListID).ToString() == "OK")
                {
                    this.m_IsLock = true;
                    this.m_IsFinish = true;
                    this.InitInterface();
                }
                else
                {
                    MessageBox.Show("Fail!");
                }
            }
        }

        private void bbiLock_ItemClick(object sender, ItemClickEventArgs e)
        {
            HRM_TIMEKEEPER_TABLELIST hrm_timekeeper_tablelist = new HRM_TIMEKEEPER_TABLELIST();
            if (hrm_timekeeper_tablelist.Lock(this.m_TimeKeeperTableListID).ToString() == "OK")
            {
                this.m_IsLock = true;
                this.InitInterface();
            }
            else
            {
                MessageBox.Show("Fail!");
            }
        }

        private void bbiOpen_ItemClick(object sender, ItemClickEventArgs e)
        {
            HRM_TIMEKEEPER_TABLELIST hrm_timekeeper_tablelist = new HRM_TIMEKEEPER_TABLELIST();
            if (hrm_timekeeper_tablelist.Open(this.m_TimeKeeperTableListID).ToString() == "OK")
            {
                this.m_IsLock = false;
                this.InitInterface();
            }
            else
            {
                MessageBox.Show("Fail!");
            }
        }

        private void bbiPrint_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!MyRule.IsPrint("bbiTimekeeperTotal"))
            {
                MyRule.Notify();
            }
            else
            {
                new xfmOptionPrintTimekeeperTable(this.m_Level, this.m_Code, this.m_Month, this.m_Year, 5).ShowDialog();
            }
        }

        private void bbiReload_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.LoadGrid(this.m_Level, this.m_Code);
        }

        private void bbiSave_ItemClick(object sender, ItemClickEventArgs e)
        {
        }

        private void bbiTotal_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!MyRule.IsEdit("bbiTimekeeperTotal"))
            {
                MyRule.Notify();
            }
            else
            {
                this.Total();
            }
        }

        private string DayName(int Year, int Month, int Day)
        {
            try
            {
                System.DateTime time = new System.DateTime(Year, Month, Day);
                return (Day.ToString() + "/" + Month.ToString() + " " + time.DayOfWeek.ToString().Substring(0, 3));
            }
            catch
            {
                return Day.ToString();
            }
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void gbList_CellValueChanged(object sender, CellValueChangedEventArgs e)
        {
        }

        private void gbList_CustomDrawRowIndicator(object sender, RowIndicatorCustomDrawEventArgs e)
        {
            if (e.RowHandle == -2147483648)
            {
                e.Handled = true;
                e.Painter.DrawObject(e.Info);
                Rectangle bounds = e.Bounds;
                e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(0x3f, 0xa5, 0xa5, 0)), bounds);
                bounds.Height--;
                bounds.Width--;
                e.Graphics.DrawRectangle(Pens.Blue, bounds);
            }
            int rowHandle = e.RowHandle;
            if (rowHandle >= 0)
            {
                rowHandle++;
                e.Info.DisplayText = rowHandle.ToString();
            }
        }

        private void gbList_FocusedColumnChanged(object sender, FocusedColumnChangedEventArgs e)
        {
        }

        private void gbList_FocusedRowChanged(object sender, FocusedRowChangedEventArgs e)
        {
        }

        private void gbList_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                base.DoShowMenu(this.gbList.CalcHitInfo(new Point(e.X, e.Y)), this.gbList, this);
            }
        }

        private void gcList_Click(object sender, EventArgs e)
        {
        }

        private void GridViewLock()
        {
        }

        private void GridViewOpen()
        {
        }

        private void Init()
        {
            //if (MyInfo.Get(MyEncryption.Encrypt("ERP01", "123654", true)) == "OK")
            {
                this.lbCompanyName.Text = this.m_CompanyName = "";// MyInfo.Company;
            }
            this.lbBranchName.Text = "";
            this.lbDepartmentName.Text = "";
            this.lbGroupName.Text = "";
            this.bbeYear.EditValue = this.clsAllOption.MonthDefault;
            this.m_Year = this.clsAllOption.MonthDefault.Year;
            this.xucOrganization1.LoadData();
            this.xucOrganization1.Selected += delegate (object s, Organization o) {
                HRM_GROUP hrm_group = new HRM_GROUP();
                HRM_DEPARTMENT hrm_department = new HRM_DEPARTMENT();
                HRM_BRANCH hrm_branch = new HRM_BRANCH();
                if (o.Level == 0)
                {
                    this.LoadGrid(this.m_Level = 0, this.m_Code = "");
                    this.lbCompanyName.Text = this.m_CompanyName;
                    this.lbBranchName.Text = "";
                    this.lbDepartmentName.Text = "";
                    this.lbGroupName.Text = "";
                }
                else if (o.Level == 1)
                {
                    this.LoadGrid(this.m_Level = 1, this.m_Code = o.BranchCode);
                    hrm_branch.Get(o.BranchCode);
                    this.lbCompanyName.Text = "";
                    this.lbBranchName.Text = hrm_branch.BranchName;
                    this.lbDepartmentName.Text = "";
                    this.lbGroupName.Text = "";
                }
                else if (o.Level == 2)
                {
                    this.LoadGrid(this.m_Level = 2, this.m_Code = o.DepartmentCode);
                    hrm_department.Get(o.DepartmentCode);
                    this.lbCompanyName.Text = "";
                    this.lbBranchName.Text = hrm_department.BranchName;
                    this.lbDepartmentName.Text = hrm_department.DepartmentName;
                    this.lbGroupName.Text = "";
                }
                else if (o.Level == 3)
                {
                    this.LoadGrid(this.m_Level = 3, this.m_Code = o.GroupCode);
                    hrm_group.Get(o.GroupCode);
                    hrm_department.Get(hrm_group.DepartmentCode);
                    this.lbCompanyName.Text = "";
                    this.lbBranchName.Text = hrm_department.BranchName;
                    this.lbDepartmentName.Text = hrm_department.DepartmentName;
                    this.lbGroupName.Text = "/ " + hrm_group.GroupName;
                }
            };
            this.xucOrganization1.Updated += o => this.xucOrganization1.LoadData();
            new HRM_TIMEKEEPER_TABLELIST().AddRepositoryGridLookupEditByYear(this.repTimeKeeperList, this.m_Year);
            this.repTimeKeeperList.ButtonClick += new ButtonPressedEventHandler(this.repTimeKeeperList_ButtonClick);
        }

        private void InitializeComponent()
        {
            this.components = new Container();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(xucTimekeeperTotal));
            SerializableAppearanceObject appearance = new SerializableAppearanceObject();
            MenuButton button = new MenuButton();
            ItemCommand command = new ItemCommand();
            ItemCommand command2 = new ItemCommand();
            ItemCommand command3 = new ItemCommand();
            ItemCommand command4 = new ItemCommand();
            ItemCommand command5 = new ItemCommand();
            ItemCommand command6 = new ItemCommand();
            ItemCommand command7 = new ItemCommand();
            ItemCommand command8 = new ItemCommand();
            ItemCommand command9 = new ItemCommand();
            ItemCommand command10 = new ItemCommand();
            ItemCommand command11 = new ItemCommand();
            ItemCommand command12 = new ItemCommand();
            ItemCommand command13 = new ItemCommand();
            ItemCommand command14 = new ItemCommand();
            ItemCommand command15 = new ItemCommand();
            ItemCommand command16 = new ItemCommand();
            ItemCommand command17 = new ItemCommand();
            ItemCommand command18 = new ItemCommand();
            ItemCommand command19 = new ItemCommand();
            ItemCommand command20 = new ItemCommand();
            ItemCommand command21 = new ItemCommand();
            ItemCommand command22 = new ItemCommand();
            ItemCommand command23 = new ItemCommand();
            ItemCommand command24 = new ItemCommand();
            ItemCommand command25 = new ItemCommand();
            ItemCommand command26 = new ItemCommand();
            ItemCommand command27 = new ItemCommand();
            ItemCommand command28 = new ItemCommand();
            ItemCommand command29 = new ItemCommand();
            this.barManager1 = new BarManager(this.components);
            this.bar1 = new Bar();
            this.bbeTimeKeeperTableListName = new BarEditItem();
            this.repTimeKeeperList = new RepositoryItemGridLookUpEdit();
            this.repositoryItemGridLookUpEdit2View = new GridView();
            this.gridColumn1 = new GridColumn();
            this.bbeYear = new BarEditItem();
            this.repYear = new RepositoryItemTimeEdit();
            this.bbiTotal = new BarButtonItem();
            this.bbiPrint = new BarButtonItem();
            this.bbiSave = new BarButtonItem();
            this.bbiExport = new BarButtonItem();
            this.bbiLock = new BarButtonItem();
            this.bbiOpen = new BarButtonItem();
            this.bbiFinish = new BarButtonItem();
            this.bbiReload = new BarButtonItem();
            this.bbiClose = new BarButtonItem();
            this.barDockControlTop = new BarDockControl();
            this.barDockControlBottom = new BarDockControl();
            this.barDockControlLeft = new BarDockControl();
            this.barDockControlRight = new BarDockControl();
            this.dockManager1 = new DockManager(this.components);
            this.hideContainerLeft = new AutoHideContainer();
            this.dockPanel1 = new DockPanel();
            this.dockPanel1_Container = new ControlContainer();
            this.xucOrganization1 = new xucOrganization();
            this.imageCollection2 = new DevExpress.Utils.ImageCollection(this.components);
            this.barButtonItem3 = new BarButtonItem();
            this.gcList = new GridControl();
            this.gbList = new BandedGridView();
            this.gridBand2 = new GridBand();
            this.colEmployeeCode = new BandedGridColumn();
            this.colFirstName = new BandedGridColumn();
            this.colLastName = new BandedGridColumn();
            this.colBranchName = new BandedGridColumn();
            this.colDepartmentName = new BandedGridColumn();
            this.colGroupName = new BandedGridColumn();
            this.gridBand3 = new GridBand();
            this.colStipulatedDay = new BandedGridColumn();
            this.colWorkTotal = new BandedGridColumn();
            this.repCal = new RepositoryItemCalcEdit();
            this.colRealDay = new BandedGridColumn();
            this.colRegulationDay = new BandedGridColumn();
            this.colFurloughDay = new BandedGridColumn();
            this.colCompensationDay = new BandedGridColumn();
            this.gridBand5 = new GridBand();
            this.colAbsentL = new BandedGridColumn();
            this.colAbsentWOL = new BandedGridColumn();
            this.colClockingError = new BandedGridColumn();
            this.colClockingErrorBegin = new BandedGridColumn();
            this.colClockingErrorEnd = new BandedGridColumn();
            this.gridBand7 = new GridBand();
            this.colStipulatedTime = new BandedGridColumn();
            this.colTotalHour = new BandedGridColumn();
            this.gridBand6 = new GridBand();
            this.colLateMinute = new BandedGridColumn();
            this.colEarlyMinute = new BandedGridColumn();
            this.gridBand1 = new GridBand();
            this.colOvertime150 = new BandedGridColumn();
            this.colOvertime200 = new BandedGridColumn();
            this.colOvertime300 = new BandedGridColumn();
            this.colOvertime195 = new BandedGridColumn();
            this.colOvertime260 = new BandedGridColumn();
            this.colOvertime390 = new BandedGridColumn();
            this.colOvertimeTotal1 = new BandedGridColumn();
            this.gridBand4 = new GridBand();
            this.colPrivateHour = new BandedGridColumn();
            this.colNightHour = new BandedGridColumn();
            this.colNightDutyDay = new BandedGridColumn();
            this.colExtraHour = new BandedGridColumn();
            this.colDescription = new BandedGridColumn();
            this.panelControl1 = new PanelControl();
            this.flowLayoutPanel3 = new FlowLayoutPanel();
            this.xucExpandCollapseButton1 = new xucExpandCollapseButton();
            this.lbGroupName = new LabelControl();
            this.lbDepartmentName = new LabelControl();
            this.flowLayoutPanel2 = new FlowLayoutPanel();
            this.lbBranchName = new LabelControl();
            this.lbCompanyName = new LabelControl();
            this.flowLayoutPanel1 = new FlowLayoutPanel();
            this.lbTimeKeeperOverTimeName = new LabelControl();
            this.ptLock = new PictureBox();
            this.ptFinish = new PictureBox();
            this.lbMessage = new LabelControl();
            this.barManager1.BeginInit();
            this.repTimeKeeperList.BeginInit();
            this.repositoryItemGridLookUpEdit2View.BeginInit();
            this.repYear.BeginInit();
            this.dockManager1.BeginInit();
            this.hideContainerLeft.SuspendLayout();
            this.dockPanel1.SuspendLayout();
            this.dockPanel1_Container.SuspendLayout();
            this.imageCollection2.BeginInit();
            this.gcList.BeginInit();
            this.gbList.BeginInit();
            this.repCal.BeginInit();
            this.panelControl1.BeginInit();
            this.panelControl1.SuspendLayout();
            this.flowLayoutPanel3.SuspendLayout();
            this.flowLayoutPanel2.SuspendLayout();
            this.flowLayoutPanel1.SuspendLayout();
            ((ISupportInitialize) this.ptLock).BeginInit();
            ((ISupportInitialize) this.ptFinish).BeginInit();
            base.SuspendLayout();
            this.barManager1.Bars.AddRange(new Bar[] { this.bar1 });
            this.barManager1.DockControls.Add(this.barDockControlTop);
            this.barManager1.DockControls.Add(this.barDockControlBottom);
            this.barManager1.DockControls.Add(this.barDockControlLeft);
            this.barManager1.DockControls.Add(this.barDockControlRight);
            this.barManager1.DockManager = this.dockManager1;
            this.barManager1.Form = this;
            this.barManager1.Images = this.imageCollection2;
            this.barManager1.Items.AddRange(new BarItem[] { this.bbiExport, this.bbiPrint, this.barButtonItem3, this.bbiReload, this.bbiFinish, this.bbeTimeKeeperTableListName, this.bbiClose, this.bbiLock, this.bbiOpen, this.bbeYear, this.bbiSave, this.bbiTotal });
            this.barManager1.MaxItemId = 0x13;
            this.barManager1.RepositoryItems.AddRange(new RepositoryItem[] { this.repTimeKeeperList, this.repYear });
            this.bar1.BarName = "Tools";
            this.bar1.DockCol = 0;
            this.bar1.DockRow = 0;
            this.bar1.DockStyle = BarDockStyle.Top;
            this.bar1.LinksPersistInfo.AddRange(new LinkPersistInfo[] { new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbeTimeKeeperTableListName, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbeYear, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiTotal, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiPrint, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiSave, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiExport, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiLock, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiOpen, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiFinish, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiReload, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiClose, BarItemPaintStyle.CaptionGlyph) });
            this.bar1.OptionsBar.UseWholeRow = true;
            this.bar1.Text = "Tools";
            this.bbeTimeKeeperTableListName.Caption = "T\x00ean bảng chấm c\x00f4ng:";
            this.bbeTimeKeeperTableListName.Edit = this.repTimeKeeperList;
            this.bbeTimeKeeperTableListName.Id = 12;
            this.bbeTimeKeeperTableListName.Name = "bbeTimeKeeperTableListName";
            this.bbeTimeKeeperTableListName.Width = 160;
            this.repTimeKeeperList.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.repTimeKeeperList.Appearance.Options.UseFont = true;
            this.repTimeKeeperList.AutoHeight = false;
            this.repTimeKeeperList.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo), new EditorButton(ButtonPredefines.Glyph, "", -1, true, true, false, ImageLocation.MiddleCenter, (Image) manager.GetObject("repTimeKeeperList.Buttons"), new KeyShortcut(Keys.None), appearance, "", null, null, true) });
            this.repTimeKeeperList.Name = "repTimeKeeperList";
            this.repTimeKeeperList.NullText = "[Chọn bảng chấm c\x00f4ng]";
            this.repTimeKeeperList.View = this.repositoryItemGridLookUpEdit2View;
            this.repTimeKeeperList.EditValueChanging += new ChangingEventHandler(this.repTimeKeeperList_EditValueChanging);
            this.repTimeKeeperList.EditValueChanged += new EventHandler(this.repTimeKeeperList_EditValueChanged);
            this.repositoryItemGridLookUpEdit2View.Columns.AddRange(new GridColumn[] { this.gridColumn1 });
            this.repositoryItemGridLookUpEdit2View.FocusRectStyle = DrawFocusRectStyle.RowFocus;
            this.repositoryItemGridLookUpEdit2View.Name = "repositoryItemGridLookUpEdit2View";
            this.repositoryItemGridLookUpEdit2View.OptionsSelection.EnableAppearanceFocusedCell = false;
            this.repositoryItemGridLookUpEdit2View.OptionsView.ShowGroupPanel = false;
            this.gridColumn1.Caption = "T\x00ean bảng chấm c\x00f4ng";
            this.gridColumn1.FieldName = "TimeKeeperTableListName";
            this.gridColumn1.Name = "gridColumn1";
            this.gridColumn1.Visible = true;
            this.gridColumn1.VisibleIndex = 0;
            this.bbeYear.Caption = "Lọc theo năm:";
            this.bbeYear.Edit = this.repYear;
            this.bbeYear.Id = 0x10;
            this.bbeYear.Name = "bbeYear";
            this.bbeYear.Width = 60;
            this.bbeYear.EditValueChanged += new EventHandler(this.bbeYear_EditValueChanged);
            this.repYear.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.repYear.Appearance.Options.UseFont = true;
            this.repYear.AutoHeight = false;
            this.repYear.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.repYear.Mask.EditMask = "yyyy";
            this.repYear.Name = "repYear";
            this.bbiTotal.Caption = "Tổng Hợp";
            this.bbiTotal.Enabled = false;
            this.bbiTotal.Id = 0x12;
            this.bbiTotal.ImageIndex = 11;
            this.bbiTotal.Name = "bbiTotal";
            this.bbiTotal.ItemClick += new ItemClickEventHandler(this.bbiTotal_ItemClick);
            this.bbiPrint.Caption = "In";
            this.bbiPrint.Id = 7;
            this.bbiPrint.ImageIndex = 9;
            this.bbiPrint.Name = "bbiPrint";
            this.bbiPrint.ItemClick += new ItemClickEventHandler(this.bbiPrint_ItemClick);
            this.bbiSave.Caption = "Lưu";
            this.bbiSave.Id = 0x11;
            this.bbiSave.ImageIndex = 0x15;
            this.bbiSave.Name = "bbiSave";
            this.bbiSave.Visibility = BarItemVisibility.Never;
            this.bbiSave.ItemClick += new ItemClickEventHandler(this.bbiSave_ItemClick);
            this.bbiExport.Caption = "Xuất";
            this.bbiExport.Id = 4;
            this.bbiExport.ImageIndex = 0x31;
            this.bbiExport.Name = "bbiExport";
            this.bbiExport.ItemClick += new ItemClickEventHandler(this.bbiExport_ItemClick);
            this.bbiLock.Caption = "Kho\x00e1 Sổ";
            this.bbiLock.Enabled = false;
            this.bbiLock.Id = 14;
            this.bbiLock.ImageIndex = 12;
            this.bbiLock.Name = "bbiLock";
            this.bbiLock.ItemClick += new ItemClickEventHandler(this.bbiLock_ItemClick);
            this.bbiOpen.Caption = "Mở Sổ";
            this.bbiOpen.Enabled = false;
            this.bbiOpen.Id = 15;
            this.bbiOpen.ImageIndex = 0x1f;
            this.bbiOpen.Name = "bbiOpen";
            this.bbiOpen.ItemClick += new ItemClickEventHandler(this.bbiOpen_ItemClick);
            this.bbiFinish.Caption = "Ho\x00e0n Th\x00e0nh";
            this.bbiFinish.Enabled = false;
            this.bbiFinish.Id = 10;
            this.bbiFinish.ImageIndex = 0x21;
            this.bbiFinish.Name = "bbiFinish";
            this.bbiFinish.ItemClick += new ItemClickEventHandler(this.bbiFinish_ItemClick);
            this.bbiReload.Caption = "Nạp Lại";
            this.bbiReload.Id = 9;
            this.bbiReload.ImageIndex = 0x2a;
            this.bbiReload.Name = "bbiReload";
            this.bbiReload.ItemClick += new ItemClickEventHandler(this.bbiReload_ItemClick);
            this.bbiClose.Caption = "Đ\x00f3ng";
            this.bbiClose.Id = 13;
            this.bbiClose.ImageIndex = 0x16;
            this.bbiClose.Name = "bbiClose";
            this.bbiClose.ItemClick += new ItemClickEventHandler(this.bbiClose_ItemClick);
            this.dockManager1.AutoHideContainers.AddRange(new AutoHideContainer[] { this.hideContainerLeft });
            this.dockManager1.Form = this;
            this.dockManager1.TopZIndexControls.AddRange(new string[] { "DevExpress.XtraBars.BarDockControl", "DevExpress.XtraBars.StandaloneBarDockControl", "System.Windows.Forms.StatusBar", "DevExpress.XtraBars.Ribbon.RibbonStatusBar", "DevExpress.XtraBars.Ribbon.RibbonControl" });
            this.hideContainerLeft.Controls.Add(this.dockPanel1);
            this.hideContainerLeft.Dock = DockStyle.Left;
            this.hideContainerLeft.Location = new Point(0, 0x1a);
            this.hideContainerLeft.Name = "hideContainerLeft";
            this.hideContainerLeft.Size = new Size(0x13, 600);
            this.dockPanel1.Controls.Add(this.dockPanel1_Container);
            this.dockPanel1.Dock = DockingStyle.Left;
            this.dockPanel1.ID = new Guid("562688f1-5ae7-418e-b080-18d690e64c7d");
            this.dockPanel1.Location = new Point(0, 0);
            this.dockPanel1.Name = "dockPanel1";
            this.dockPanel1.OriginalSize = new Size(280, 200);
            this.dockPanel1.SavedDock = DockingStyle.Left;
            this.dockPanel1.SavedIndex = 1;
            this.dockPanel1.Size = new Size(280, 0x245);
            this.dockPanel1.Text = "Cơ cấu ph\x00f2ng ban";
            this.dockPanel1.Visibility = DockVisibility.AutoHide;
            this.dockPanel1_Container.Controls.Add(this.xucOrganization1);
            this.dockPanel1_Container.Location = new Point(3, 0x19);
            this.dockPanel1_Container.Name = "dockPanel1_Container";
            this.dockPanel1_Container.Size = new Size(0x112, 0x229);
            this.dockPanel1_Container.TabIndex = 0;
            this.xucOrganization1.Dock = DockStyle.Fill;
            this.xucOrganization1.IsClose = CloseOrNew.None;
            this.xucOrganization1.Location = new Point(0, 0);
            this.xucOrganization1.Name = "xucOrganization1";
            this.xucOrganization1.NotSave = false;
            command.Caption = "";
            command.Enable = false;
            command.Visibility = BarItemVisibility.Never;
            button.Add = command;
            command2.Caption = "";
            command2.Enable = false;
            command2.Visibility = BarItemVisibility.Never;
            button.Cancel = command2;
            command3.Caption = "";
            command3.Enable = false;
            command3.Visibility = BarItemVisibility.Never;
            button.Change = command3;
            command4.Caption = "";
            command4.Enable = false;
            command4.Visibility = BarItemVisibility.Never;
            button.Close = command4;
            command5.Caption = "";
            command5.Enable = false;
            command5.Visibility = BarItemVisibility.Never;
            button.Custom = command5;
            command6.Caption = "";
            command6.Enable = false;
            command6.Visibility = BarItemVisibility.Never;
            button.Delete = command6;
            command7.Caption = "";
            command7.Enable = false;
            command7.Visibility = BarItemVisibility.Never;
            button.Export = command7;
            command8.Caption = "";
            command8.Enable = false;
            command8.Visibility = BarItemVisibility.Never;
            button.Filter = command8;
            command9.Caption = "";
            command9.Enable = false;
            command9.Visibility = BarItemVisibility.Never;
            button.FilterCustomer = command9;
            command10.Caption = "";
            command10.Enable = false;
            command10.Visibility = BarItemVisibility.Never;
            button.FilterStock = command10;
            command11.Caption = "";
            command11.Enable = false;
            command11.Visibility = BarItemVisibility.Never;
            button.Find = command11;
            button.GClose = false;
            button.GCommand = false;
            button.GExport = false;
            command12.Caption = "";
            command12.Enable = false;
            command12.Visibility = BarItemVisibility.Never;
            button.Go = command12;
            button.GOption = false;
            button.GPrint = false;
            button.GRecords = false;
            button.GSearchBar = false;
            button.GSettings = false;
            button.GVaildation = false;
            command13.Caption = "";
            command13.Enable = false;
            command13.Visibility = BarItemVisibility.Never;
            button.Import = command13;
            command14.Caption = "";
            command14.Enable = false;
            command14.Visibility = BarItemVisibility.Never;
            button.Next = command14;
            command15.Caption = "";
            command15.Enable = false;
            command15.Visibility = BarItemVisibility.Never;
            button.PageSetup = command15;
            button.PHome = false;
            command16.Caption = "";
            command16.Enable = false;
            command16.Visibility = BarItemVisibility.Never;
            button.Previous = command16;
            command17.Caption = "";
            command17.Enable = false;
            command17.Visibility = BarItemVisibility.Never;
            button.Print = command17;
            command18.Caption = "";
            command18.Enable = false;
            command18.Visibility = BarItemVisibility.Never;
            button.PrintPreview = command18;
            button.PTool = false;
            command19.Caption = "";
            command19.Enable = false;
            command19.Visibility = BarItemVisibility.Never;
            button.Redo = command19;
            command20.Caption = "";
            command20.Enable = false;
            command20.Visibility = BarItemVisibility.Never;
            button.Refresh = command20;
            command21.Caption = "";
            command21.Enable = false;
            command21.Visibility = BarItemVisibility.Never;
            button.Save = command21;
            command22.Caption = "";
            command22.Enable = false;
            command22.Visibility = BarItemVisibility.Never;
            button.SaveAndClose = command22;
            command23.Caption = "";
            command23.Enable = false;
            command23.Visibility = BarItemVisibility.Never;
            button.SaveAndNew = command23;
            command24.Caption = "";
            command24.Enable = false;
            command24.Visibility = BarItemVisibility.Never;
            button.Search = command24;
            command25.Caption = "";
            command25.Enable = false;
            command25.Visibility = BarItemVisibility.Never;
            button.SearchText = command25;
            command26.Caption = "";
            command26.Enable = false;
            command26.Visibility = BarItemVisibility.Never;
            button.Task = command26;
            command27.Caption = "";
            command27.Enable = false;
            command27.Visibility = BarItemVisibility.Never;
            button.Undo = command27;
            command28.Caption = "";
            command28.Enable = false;
            command28.Visibility = BarItemVisibility.Never;
            button.Vaildate = command28;
            command29.Caption = "";
            command29.Enable = false;
            command29.Visibility = BarItemVisibility.Never;
            button.View = command29;
            this.xucOrganization1.RibbonBar = button;
            this.xucOrganization1.Size = new Size(0x112, 0x229);
            this.xucOrganization1.Status = Actions.None;
            this.xucOrganization1.TabIndex = 0;
            this.xucOrganization1.Title = "";
            this.imageCollection2.ImageStream = (ImageCollectionStreamer) manager.GetObject("imageCollection2.ImageStream");
            this.imageCollection2.Images.SetKeyName(0x3d, "Vista (35).ico");
            this.imageCollection2.Images.SetKeyName(0x3e, "Security.ico");
            this.imageCollection2.Images.SetKeyName(0x3f, "RibbonPrintPreview_DocumentMapLarge.png");
            this.imageCollection2.Images.SetKeyName(0x40, "11.png");
            this.imageCollection2.Images.SetKeyName(0x41, "Sua.png");
            this.imageCollection2.Images.SetKeyName(0x42, "Them.png");
            this.imageCollection2.Images.SetKeyName(0x43, "PhanQuyen.png");
            this.imageCollection2.Images.SetKeyName(0x44, "11.png");
            this.imageCollection2.Images.SetKeyName(0x45, "plus.png");
            this.barButtonItem3.Caption = "Lưu";
            this.barButtonItem3.Id = 8;
            this.barButtonItem3.ImageIndex = 10;
            this.barButtonItem3.Name = "barButtonItem3";
            this.gcList.Dock = DockStyle.Fill;
            this.gcList.EmbeddedNavigator.Buttons.Append.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.CancelEdit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.Edit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.EndEdit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.Remove.Visible = false;
            this.gcList.EmbeddedNavigator.TextStringFormat = "{0}/{1}";
            this.gcList.Location = new Point(0x13, 0x49);
            this.gcList.MainView = this.gbList;
            this.gcList.Name = "gcList";
            this.gcList.RepositoryItems.AddRange(new RepositoryItem[] { this.repCal });
            this.gcList.Size = new Size(0x49d, 0x229);
            this.gcList.TabIndex = 5;
            this.gcList.UseEmbeddedNavigator = true;
            this.gcList.ViewCollection.AddRange(new BaseView[] { this.gbList });
            this.gcList.Click += new EventHandler(this.gcList_Click);
            this.gbList.Appearance.GroupRow.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.gbList.Appearance.GroupRow.Options.UseFont = true;
            this.gbList.Appearance.HeaderPanel.Options.UseTextOptions = true;
            this.gbList.Appearance.HeaderPanel.TextOptions.HAlignment = HorzAlignment.Center;
            this.gbList.Appearance.HeaderPanel.TextOptions.WordWrap = WordWrap.Wrap;
            this.gbList.Bands.AddRange(new GridBand[] { this.gridBand2, this.gridBand3, this.gridBand5, this.gridBand7, this.gridBand6, this.gridBand1, this.gridBand4 });
            this.gbList.ColumnPanelRowHeight = 0x20;
            this.gbList.Columns.AddRange(new BandedGridColumn[] { 
                this.colEmployeeCode, this.colFirstName, this.colLastName, this.colBranchName, this.colDepartmentName, this.colGroupName, this.colStipulatedDay, this.colWorkTotal, this.colRealDay, this.colRegulationDay, this.colFurloughDay, this.colCompensationDay, this.colAbsentL, this.colAbsentWOL, this.colClockingError, this.colClockingErrorBegin, 
                this.colClockingErrorEnd, this.colStipulatedTime, this.colTotalHour, this.colLateMinute, this.colEarlyMinute, this.colOvertime150, this.colOvertime200, this.colOvertime300, this.colPrivateHour, this.colOvertimeTotal1, this.colOvertime195, this.colOvertime260, this.colOvertime390, this.colNightHour, this.colNightDutyDay, this.colExtraHour, 
                this.colDescription
             });
            this.gbList.FixedLineWidth = 1;
            this.gbList.FocusRectStyle = DrawFocusRectStyle.RowFocus;
            this.gbList.GridControl = this.gcList;
            this.gbList.GroupPanelText = "K\x00e9o v\x00e0 Thả cột v\x00e0o đ\x00e2y để nh\x00f3m dữ liệu";
            this.gbList.GroupSummary.AddRange(new GridSummaryItem[] { new GridGroupSummaryItem(SummaryItemType.Sum, "WorkTotal", this.colWorkTotal, ""), new GridGroupSummaryItem(SummaryItemType.Sum, "RealDay", this.colRealDay, ""), new GridGroupSummaryItem(SummaryItemType.Sum, "RegulationDay", this.colRegulationDay, ""), new GridGroupSummaryItem(SummaryItemType.Sum, "FurloughDay", this.colFurloughDay, ""), new GridGroupSummaryItem(SummaryItemType.Sum, "CompensationDay", this.colCompensationDay, ""), new GridGroupSummaryItem(SummaryItemType.Sum, "Overtime15", this.colOvertime150, ""), new GridGroupSummaryItem(SummaryItemType.Sum, "Overtime20", this.colOvertime200, ""), new GridGroupSummaryItem(SummaryItemType.Sum, "Overtime30", this.colOvertime300, ""), new GridGroupSummaryItem(SummaryItemType.Sum, "OvertimePrivate", this.colPrivateHour, ""), new GridGroupSummaryItem(SummaryItemType.Sum, "OvertimeTotal", this.colOvertimeTotal1, ""), new GridGroupSummaryItem(SummaryItemType.Sum, "NightHour", this.colNightHour, "") });
            this.gbList.IndicatorWidth = 40;
            this.gbList.Name = "gbList";
            this.gbList.OptionsBehavior.AllowIncrementalSearch = true;
            this.gbList.OptionsBehavior.AutoExpandAllGroups = true;
            this.gbList.OptionsBehavior.CopyToClipboardWithColumnHeaders = false;
            this.gbList.OptionsBehavior.FocusLeaveOnTab = true;
            this.gbList.OptionsCustomization.AllowFilter = false;
            this.gbList.OptionsFilter.AllowColumnMRUFilterList = false;
            this.gbList.OptionsFilter.AllowFilterEditor = false;
            this.gbList.OptionsFilter.AllowMRUFilterList = false;
            this.gbList.OptionsLayout.StoreAllOptions = true;
            this.gbList.OptionsLayout.StoreAppearance = true;
            this.gbList.OptionsMenu.EnableColumnMenu = false;
            this.gbList.OptionsMenu.EnableGroupPanelMenu = false;
            this.gbList.OptionsNavigation.EnterMoveNextColumn = true;
            this.gbList.OptionsSelection.InvertSelection = true;
            this.gbList.OptionsSelection.MultiSelect = true;
            this.gbList.OptionsView.AllowCellMerge = true;
            this.gbList.OptionsView.ColumnAutoWidth = false;
            this.gbList.OptionsView.ShowAutoFilterRow = true;
            this.gbList.OptionsView.ShowFilterPanelMode = ShowFilterPanelMode.Never;
            this.gbList.OptionsView.ShowFooter = true;
            this.gbList.OptionsView.ShowGroupPanel = false;
            this.gbList.FocusedRowChanged += new FocusedRowChangedEventHandler(this.gbList_FocusedRowChanged);
            this.gbList.CustomDrawRowIndicator += new RowIndicatorCustomDrawEventHandler(this.gbList_CustomDrawRowIndicator);
            this.gbList.FocusedColumnChanged += new FocusedColumnChangedEventHandler(this.gbList_FocusedColumnChanged);
            this.gbList.CellValueChanged += new CellValueChangedEventHandler(this.gbList_CellValueChanged);
            this.gbList.MouseDown += new MouseEventHandler(this.gbList_MouseDown);
            this.gridBand2.AppearanceHeader.Options.UseTextOptions = true;
            this.gridBand2.AppearanceHeader.TextOptions.HAlignment = HorzAlignment.Center;
            this.gridBand2.Caption = "Th\x00f4ng tin nh\x00e2n vi\x00ean";
            this.gridBand2.Columns.Add(this.colEmployeeCode);
            this.gridBand2.Columns.Add(this.colFirstName);
            this.gridBand2.Columns.Add(this.colLastName);
            this.gridBand2.Columns.Add(this.colBranchName);
            this.gridBand2.Columns.Add(this.colDepartmentName);
            this.gridBand2.Columns.Add(this.colGroupName);
            this.gridBand2.Fixed = FixedStyle.Left;
            this.gridBand2.Name = "gridBand2";
            this.gridBand2.Width = 0xf1;
            this.colEmployeeCode.AppearanceHeader.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.colEmployeeCode.AppearanceHeader.Options.UseFont = true;
            this.colEmployeeCode.Caption = "M\x00e3 nh\x00e2n vi\x00ean";
            this.colEmployeeCode.FieldName = "EmployeeCode";
            this.colEmployeeCode.Name = "colEmployeeCode";
            this.colEmployeeCode.OptionsColumn.AllowEdit = false;
            this.colEmployeeCode.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colEmployeeCode.OptionsColumn.ReadOnly = true;
            this.colEmployeeCode.Visible = true;
            this.colFirstName.AppearanceHeader.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.colFirstName.AppearanceHeader.Options.UseFont = true;
            this.colFirstName.Caption = "Họ l\x00f3t";
            this.colFirstName.FieldName = "FirstName";
            this.colFirstName.Name = "colFirstName";
            this.colFirstName.OptionsColumn.AllowEdit = false;
            this.colFirstName.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colFirstName.OptionsColumn.ReadOnly = true;
            this.colFirstName.Visible = true;
            this.colFirstName.Width = 110;
            this.colLastName.AppearanceHeader.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.colLastName.AppearanceHeader.Options.UseFont = true;
            this.colLastName.Caption = "T\x00ean";
            this.colLastName.FieldName = "LastName";
            this.colLastName.Name = "colLastName";
            this.colLastName.OptionsColumn.AllowEdit = false;
            this.colLastName.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colLastName.OptionsColumn.ReadOnly = true;
            this.colLastName.Visible = true;
            this.colLastName.Width = 0x38;
            this.colBranchName.Caption = "Chi nh\x00e1nh";
            this.colBranchName.FieldName = "BranchName";
            this.colBranchName.Name = "colBranchName";
            this.colBranchName.OptionsColumn.AllowEdit = false;
            this.colBranchName.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colBranchName.OptionsColumn.ReadOnly = true;
            this.colDepartmentName.Caption = "Ph\x00f2ng ban";
            this.colDepartmentName.FieldName = "DepartmentName";
            this.colDepartmentName.Name = "colDepartmentName";
            this.colDepartmentName.OptionsColumn.AllowEdit = false;
            this.colDepartmentName.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDepartmentName.OptionsColumn.ReadOnly = true;
            this.colGroupName.Caption = "Tổ nh\x00f3m";
            this.colGroupName.FieldName = "GroupName";
            this.colGroupName.Name = "colGroupName";
            this.colGroupName.OptionsColumn.AllowEdit = false;
            this.colGroupName.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colGroupName.OptionsColumn.ReadOnly = true;
            this.gridBand3.AppearanceHeader.ForeColor = Color.DarkOliveGreen;
            this.gridBand3.AppearanceHeader.Options.UseForeColor = true;
            this.gridBand3.AppearanceHeader.Options.UseTextOptions = true;
            this.gridBand3.AppearanceHeader.TextOptions.HAlignment = HorzAlignment.Center;
            this.gridBand3.Caption = "Ng\x00e0y t\x00ednh c\x00f4ng";
            this.gridBand3.Columns.Add(this.colStipulatedDay);
            this.gridBand3.Columns.Add(this.colWorkTotal);
            this.gridBand3.Columns.Add(this.colRealDay);
            this.gridBand3.Columns.Add(this.colRegulationDay);
            this.gridBand3.Columns.Add(this.colFurloughDay);
            this.gridBand3.Columns.Add(this.colCompensationDay);
            this.gridBand3.Name = "gridBand3";
            this.gridBand3.Width = 350;
            this.colStipulatedDay.AppearanceCell.BackColor = Color.GhostWhite;
            this.colStipulatedDay.AppearanceCell.Options.UseBackColor = true;
            this.colStipulatedDay.AppearanceCell.Options.UseTextOptions = true;
            this.colStipulatedDay.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colStipulatedDay.AppearanceHeader.ForeColor = Color.Red;
            this.colStipulatedDay.AppearanceHeader.Options.UseForeColor = true;
            this.colStipulatedDay.Caption = "Ng\x00e0y c\x00f4ng quy định";
            this.colStipulatedDay.FieldName = "StipulatedDay";
            this.colStipulatedDay.Name = "colStipulatedDay";
            this.colStipulatedDay.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colStipulatedDay.OptionsColumn.ReadOnly = true;
            this.colStipulatedDay.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colWorkTotal.AppearanceCell.BackColor = Color.WhiteSmoke;
            this.colWorkTotal.AppearanceCell.Options.UseBackColor = true;
            this.colWorkTotal.AppearanceCell.Options.UseTextOptions = true;
            this.colWorkTotal.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colWorkTotal.AppearanceHeader.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.colWorkTotal.AppearanceHeader.ForeColor = Color.Red;
            this.colWorkTotal.AppearanceHeader.Options.UseFont = true;
            this.colWorkTotal.AppearanceHeader.Options.UseForeColor = true;
            this.colWorkTotal.Caption = "Tổng c\x00f4ng";
            this.colWorkTotal.ColumnEdit = this.repCal;
            this.colWorkTotal.FieldName = "WorkTotal";
            this.colWorkTotal.Name = "colWorkTotal";
            this.colWorkTotal.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colWorkTotal.OptionsColumn.ReadOnly = true;
            this.colWorkTotal.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colWorkTotal.Visible = true;
            this.colWorkTotal.Width = 0x44;
            this.repCal.AutoHeight = false;
            this.repCal.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.repCal.Name = "repCal";
            this.colRealDay.AppearanceCell.BackColor = Color.MintCream;
            this.colRealDay.AppearanceCell.Options.UseBackColor = true;
            this.colRealDay.AppearanceCell.Options.UseTextOptions = true;
            this.colRealDay.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colRealDay.AppearanceHeader.ForeColor = Color.DarkOliveGreen;
            this.colRealDay.AppearanceHeader.Options.UseForeColor = true;
            this.colRealDay.Caption = "NC thực tế, C\x00f4ng t\x00e1c";
            this.colRealDay.ColumnEdit = this.repCal;
            this.colRealDay.FieldName = "RealDay";
            this.colRealDay.Name = "colRealDay";
            this.colRealDay.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colRealDay.OptionsColumn.ReadOnly = true;
            this.colRealDay.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colRealDay.Visible = true;
            this.colRealDay.Width = 0x44;
            this.colRegulationDay.AppearanceCell.BackColor = Color.MintCream;
            this.colRegulationDay.AppearanceCell.Options.UseBackColor = true;
            this.colRegulationDay.AppearanceCell.Options.UseTextOptions = true;
            this.colRegulationDay.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colRegulationDay.AppearanceHeader.ForeColor = Color.DarkOliveGreen;
            this.colRegulationDay.AppearanceHeader.Options.UseForeColor = true;
            this.colRegulationDay.Caption = "Nghỉ chế độ";
            this.colRegulationDay.ColumnEdit = this.repCal;
            this.colRegulationDay.FieldName = "RegulationDay";
            this.colRegulationDay.Name = "colRegulationDay";
            this.colRegulationDay.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colRegulationDay.OptionsColumn.ReadOnly = true;
            this.colRegulationDay.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colRegulationDay.Visible = true;
            this.colRegulationDay.Width = 0x44;
            this.colFurloughDay.AppearanceCell.BackColor = Color.MintCream;
            this.colFurloughDay.AppearanceCell.Options.UseBackColor = true;
            this.colFurloughDay.AppearanceCell.Options.UseTextOptions = true;
            this.colFurloughDay.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colFurloughDay.AppearanceHeader.ForeColor = Color.DarkOliveGreen;
            this.colFurloughDay.AppearanceHeader.Options.UseForeColor = true;
            this.colFurloughDay.Caption = "Nghỉ ph\x00e9p năm";
            this.colFurloughDay.ColumnEdit = this.repCal;
            this.colFurloughDay.FieldName = "FurloughDay";
            this.colFurloughDay.Name = "colFurloughDay";
            this.colFurloughDay.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colFurloughDay.OptionsColumn.ReadOnly = true;
            this.colFurloughDay.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colFurloughDay.Visible = true;
            this.colFurloughDay.Width = 0x44;
            this.colCompensationDay.AppearanceCell.BackColor = Color.MintCream;
            this.colCompensationDay.AppearanceCell.Options.UseBackColor = true;
            this.colCompensationDay.AppearanceCell.Options.UseTextOptions = true;
            this.colCompensationDay.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colCompensationDay.AppearanceHeader.ForeColor = Color.DarkOliveGreen;
            this.colCompensationDay.AppearanceHeader.Options.UseForeColor = true;
            this.colCompensationDay.Caption = "Nghỉ b\x00f9";
            this.colCompensationDay.ColumnEdit = this.repCal;
            this.colCompensationDay.FieldName = "CompensationDay";
            this.colCompensationDay.Name = "colCompensationDay";
            this.colCompensationDay.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colCompensationDay.OptionsColumn.ReadOnly = true;
            this.colCompensationDay.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colCompensationDay.Visible = true;
            this.colCompensationDay.Width = 0x4e;
            this.gridBand5.AppearanceHeader.ForeColor = Color.Purple;
            this.gridBand5.AppearanceHeader.Options.UseForeColor = true;
            this.gridBand5.AppearanceHeader.Options.UseTextOptions = true;
            this.gridBand5.AppearanceHeader.TextOptions.HAlignment = HorzAlignment.Center;
            this.gridBand5.Caption = "Ng\x00e0y kh\x00f4ng t\x00ednh c\x00f4ng";
            this.gridBand5.Columns.Add(this.colAbsentL);
            this.gridBand5.Columns.Add(this.colAbsentWOL);
            this.gridBand5.Columns.Add(this.colClockingError);
            this.gridBand5.Columns.Add(this.colClockingErrorBegin);
            this.gridBand5.Columns.Add(this.colClockingErrorEnd);
            this.gridBand5.Name = "gridBand5";
            this.gridBand5.Width = 0x126;
            this.colAbsentL.AppearanceCell.BackColor = Color.GhostWhite;
            this.colAbsentL.AppearanceCell.Options.UseBackColor = true;
            this.colAbsentL.AppearanceCell.Options.UseTextOptions = true;
            this.colAbsentL.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colAbsentL.AppearanceHeader.ForeColor = Color.Purple;
            this.colAbsentL.AppearanceHeader.Options.UseForeColor = true;
            this.colAbsentL.Caption = "Nghỉ c\x00f3 l\x00fd do";
            this.colAbsentL.ColumnEdit = this.repCal;
            this.colAbsentL.FieldName = "AbsentL";
            this.colAbsentL.Name = "colAbsentL";
            this.colAbsentL.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colAbsentL.OptionsColumn.ReadOnly = true;
            this.colAbsentL.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colAbsentL.Visible = true;
            this.colAbsentL.Width = 0x48;
            this.colAbsentWOL.AppearanceCell.BackColor = Color.GhostWhite;
            this.colAbsentWOL.AppearanceCell.Options.UseBackColor = true;
            this.colAbsentWOL.AppearanceCell.Options.UseTextOptions = true;
            this.colAbsentWOL.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colAbsentWOL.AppearanceHeader.ForeColor = Color.Purple;
            this.colAbsentWOL.AppearanceHeader.Options.UseForeColor = true;
            this.colAbsentWOL.Caption = "Nghỉ kh\x00f4ng l\x00fd do";
            this.colAbsentWOL.ColumnEdit = this.repCal;
            this.colAbsentWOL.FieldName = "AbsentWOL";
            this.colAbsentWOL.Name = "colAbsentWOL";
            this.colAbsentWOL.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colAbsentWOL.OptionsColumn.ReadOnly = true;
            this.colAbsentWOL.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colAbsentWOL.Visible = true;
            this.colAbsentWOL.Width = 0x48;
            this.colClockingError.AppearanceCell.BackColor = Color.GhostWhite;
            this.colClockingError.AppearanceCell.Options.UseBackColor = true;
            this.colClockingError.AppearanceCell.Options.UseTextOptions = true;
            this.colClockingError.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colClockingError.AppearanceHeader.ForeColor = Color.Purple;
            this.colClockingError.AppearanceHeader.Options.UseForeColor = true;
            this.colClockingError.Caption = "Chấm c\x00f4ng sai";
            this.colClockingError.ColumnEdit = this.repCal;
            this.colClockingError.FieldName = "ClockingError";
            this.colClockingError.Name = "colClockingError";
            this.colClockingError.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colClockingError.OptionsColumn.ReadOnly = true;
            this.colClockingError.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colClockingErrorBegin.AppearanceCell.BackColor = Color.GhostWhite;
            this.colClockingErrorBegin.AppearanceCell.Options.UseBackColor = true;
            this.colClockingErrorBegin.AppearanceCell.Options.UseTextOptions = true;
            this.colClockingErrorBegin.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colClockingErrorBegin.AppearanceHeader.ForeColor = Color.Purple;
            this.colClockingErrorBegin.AppearanceHeader.Options.UseForeColor = true;
            this.colClockingErrorBegin.Caption = "Kh\x00f4ng chấm v\x00e0o";
            this.colClockingErrorBegin.ColumnEdit = this.repCal;
            this.colClockingErrorBegin.FieldName = "ClockingErrorBegin";
            this.colClockingErrorBegin.Name = "colClockingErrorBegin";
            this.colClockingErrorBegin.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colClockingErrorBegin.OptionsColumn.ReadOnly = true;
            this.colClockingErrorBegin.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colClockingErrorBegin.Visible = true;
            this.colClockingErrorEnd.AppearanceCell.BackColor = Color.GhostWhite;
            this.colClockingErrorEnd.AppearanceCell.Options.UseBackColor = true;
            this.colClockingErrorEnd.AppearanceCell.Options.UseTextOptions = true;
            this.colClockingErrorEnd.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colClockingErrorEnd.AppearanceHeader.ForeColor = Color.Purple;
            this.colClockingErrorEnd.AppearanceHeader.Options.UseForeColor = true;
            this.colClockingErrorEnd.Caption = "Kh\x00f4ng chấm ra";
            this.colClockingErrorEnd.ColumnEdit = this.repCal;
            this.colClockingErrorEnd.FieldName = "ClockingErrorEnd";
            this.colClockingErrorEnd.Name = "colClockingErrorEnd";
            this.colClockingErrorEnd.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colClockingErrorEnd.OptionsColumn.ReadOnly = true;
            this.colClockingErrorEnd.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colClockingErrorEnd.Visible = true;
            this.gridBand7.Columns.Add(this.colStipulatedTime);
            this.gridBand7.Columns.Add(this.colTotalHour);
            this.gridBand7.Name = "gridBand7";
            this.gridBand7.Width = 0x4b;
            this.colStipulatedTime.AppearanceCell.BackColor = Color.GhostWhite;
            this.colStipulatedTime.AppearanceCell.Options.UseBackColor = true;
            this.colStipulatedTime.AppearanceCell.Options.UseTextOptions = true;
            this.colStipulatedTime.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colStipulatedTime.AppearanceHeader.ForeColor = Color.Red;
            this.colStipulatedTime.AppearanceHeader.Options.UseForeColor = true;
            this.colStipulatedTime.Caption = "Giờ c\x00f4ng quy định";
            this.colStipulatedTime.ColumnEdit = this.repCal;
            this.colStipulatedTime.FieldName = "StipulatedTime";
            this.colStipulatedTime.Name = "colStipulatedTime";
            this.colStipulatedTime.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colStipulatedTime.OptionsColumn.ReadOnly = true;
            this.colStipulatedTime.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colTotalHour.AppearanceCell.BackColor = Color.SeaShell;
            this.colTotalHour.AppearanceCell.Options.UseBackColor = true;
            this.colTotalHour.AppearanceCell.Options.UseTextOptions = true;
            this.colTotalHour.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colTotalHour.AppearanceHeader.ForeColor = Color.Red;
            this.colTotalHour.AppearanceHeader.Options.UseForeColor = true;
            this.colTotalHour.Caption = "Tổng giờ";
            this.colTotalHour.ColumnEdit = this.repCal;
            this.colTotalHour.FieldName = "TotalHour";
            this.colTotalHour.Name = "colTotalHour";
            this.colTotalHour.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colTotalHour.OptionsColumn.ReadOnly = true;
            this.colTotalHour.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colTotalHour.Visible = true;
            this.gridBand6.AppearanceHeader.ForeColor = Color.Red;
            this.gridBand6.AppearanceHeader.Options.UseForeColor = true;
            this.gridBand6.AppearanceHeader.Options.UseTextOptions = true;
            this.gridBand6.AppearanceHeader.TextOptions.HAlignment = HorzAlignment.Center;
            this.gridBand6.Caption = "Đi trễ, về sớm";
            this.gridBand6.Columns.Add(this.colLateMinute);
            this.gridBand6.Columns.Add(this.colEarlyMinute);
            this.gridBand6.Name = "gridBand6";
            this.gridBand6.Width = 0x7f;
            this.colLateMinute.AppearanceCell.BackColor = Color.SeaShell;
            this.colLateMinute.AppearanceCell.Options.UseBackColor = true;
            this.colLateMinute.AppearanceCell.Options.UseTextOptions = true;
            this.colLateMinute.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colLateMinute.AppearanceHeader.ForeColor = Color.Red;
            this.colLateMinute.AppearanceHeader.Options.UseForeColor = true;
            this.colLateMinute.Caption = "Đi trễ (m)";
            this.colLateMinute.ColumnEdit = this.repCal;
            this.colLateMinute.FieldName = "LateMinute";
            this.colLateMinute.Name = "colLateMinute";
            this.colLateMinute.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colLateMinute.OptionsColumn.ReadOnly = true;
            this.colLateMinute.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colLateMinute.Visible = true;
            this.colLateMinute.Width = 0x3f;
            this.colEarlyMinute.AppearanceCell.BackColor = Color.SeaShell;
            this.colEarlyMinute.AppearanceCell.Options.UseBackColor = true;
            this.colEarlyMinute.AppearanceCell.Options.UseTextOptions = true;
            this.colEarlyMinute.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colEarlyMinute.AppearanceHeader.ForeColor = Color.Red;
            this.colEarlyMinute.AppearanceHeader.Options.UseForeColor = true;
            this.colEarlyMinute.Caption = "Về sớm (m)";
            this.colEarlyMinute.ColumnEdit = this.repCal;
            this.colEarlyMinute.FieldName = "EarlyMinute";
            this.colEarlyMinute.Name = "colEarlyMinute";
            this.colEarlyMinute.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colEarlyMinute.OptionsColumn.ReadOnly = true;
            this.colEarlyMinute.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colEarlyMinute.Visible = true;
            this.colEarlyMinute.Width = 0x40;
            this.gridBand1.AppearanceHeader.ForeColor = Color.Blue;
            this.gridBand1.AppearanceHeader.Options.UseForeColor = true;
            this.gridBand1.AppearanceHeader.Options.UseTextOptions = true;
            this.gridBand1.AppearanceHeader.TextOptions.HAlignment = HorzAlignment.Center;
            this.gridBand1.Caption = "Giờ c\x00f4ng l\x00e0m th\x00eam (Đ\x00e3 nh\x00e2n hệ số)";
            this.gridBand1.Columns.Add(this.colOvertime150);
            this.gridBand1.Columns.Add(this.colOvertime200);
            this.gridBand1.Columns.Add(this.colOvertime300);
            this.gridBand1.Columns.Add(this.colOvertime195);
            this.gridBand1.Columns.Add(this.colOvertime260);
            this.gridBand1.Columns.Add(this.colOvertime390);
            this.gridBand1.Columns.Add(this.colOvertimeTotal1);
            this.gridBand1.Name = "gridBand1";
            this.gridBand1.Width = 0x20d;
            this.colOvertime150.AppearanceCell.BackColor = Color.Azure;
            this.colOvertime150.AppearanceCell.Options.UseBackColor = true;
            this.colOvertime150.AppearanceCell.Options.UseTextOptions = true;
            this.colOvertime150.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colOvertime150.AppearanceHeader.ForeColor = Color.Blue;
            this.colOvertime150.AppearanceHeader.Options.UseForeColor = true;
            this.colOvertime150.Caption = "TC. Ng\x00e0y thường (h)";
            this.colOvertime150.ColumnEdit = this.repCal;
            this.colOvertime150.FieldName = "Overtime150";
            this.colOvertime150.Name = "colOvertime150";
            this.colOvertime150.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colOvertime150.OptionsColumn.ReadOnly = true;
            this.colOvertime150.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colOvertime150.Visible = true;
            this.colOvertime200.AppearanceCell.BackColor = Color.Azure;
            this.colOvertime200.AppearanceCell.Options.UseBackColor = true;
            this.colOvertime200.AppearanceCell.Options.UseTextOptions = true;
            this.colOvertime200.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colOvertime200.AppearanceHeader.ForeColor = Color.Blue;
            this.colOvertime200.AppearanceHeader.Options.UseForeColor = true;
            this.colOvertime200.Caption = "TC. Chủ nhật (h)";
            this.colOvertime200.ColumnEdit = this.repCal;
            this.colOvertime200.FieldName = "Overtime200";
            this.colOvertime200.Name = "colOvertime200";
            this.colOvertime200.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colOvertime200.OptionsColumn.ReadOnly = true;
            this.colOvertime200.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colOvertime200.Visible = true;
            this.colOvertime300.AppearanceCell.BackColor = Color.Azure;
            this.colOvertime300.AppearanceCell.Options.UseBackColor = true;
            this.colOvertime300.AppearanceCell.Options.UseTextOptions = true;
            this.colOvertime300.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colOvertime300.AppearanceHeader.ForeColor = Color.Blue;
            this.colOvertime300.AppearanceHeader.Options.UseForeColor = true;
            this.colOvertime300.Caption = "TC. Ng\x00e0y lễ (h)";
            this.colOvertime300.ColumnEdit = this.repCal;
            this.colOvertime300.FieldName = "Overtime300";
            this.colOvertime300.Name = "colOvertime300";
            this.colOvertime300.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colOvertime300.OptionsColumn.ReadOnly = true;
            this.colOvertime300.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colOvertime300.Visible = true;
            this.colOvertime195.AppearanceCell.BackColor = Color.Azure;
            this.colOvertime195.AppearanceCell.Options.UseBackColor = true;
            this.colOvertime195.AppearanceCell.Options.UseTextOptions = true;
            this.colOvertime195.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colOvertime195.AppearanceHeader.ForeColor = Color.Red;
            this.colOvertime195.AppearanceHeader.Options.UseForeColor = true;
            this.colOvertime195.Caption = "TCĐ. Ng\x00e0y thường (h)";
            this.colOvertime195.ColumnEdit = this.repCal;
            this.colOvertime195.FieldName = "Overtime195";
            this.colOvertime195.Name = "colOvertime195";
            this.colOvertime195.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colOvertime195.OptionsColumn.ReadOnly = true;
            this.colOvertime195.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colOvertime195.Visible = true;
            this.colOvertime260.AppearanceCell.BackColor = Color.Azure;
            this.colOvertime260.AppearanceCell.Options.UseBackColor = true;
            this.colOvertime260.AppearanceCell.Options.UseTextOptions = true;
            this.colOvertime260.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colOvertime260.AppearanceHeader.ForeColor = Color.Red;
            this.colOvertime260.AppearanceHeader.Options.UseForeColor = true;
            this.colOvertime260.Caption = "TCĐ. Chủ nhật (h)";
            this.colOvertime260.ColumnEdit = this.repCal;
            this.colOvertime260.FieldName = "Overtime260";
            this.colOvertime260.Name = "colOvertime260";
            this.colOvertime260.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colOvertime260.OptionsColumn.ReadOnly = true;
            this.colOvertime260.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colOvertime260.Visible = true;
            this.colOvertime390.AppearanceCell.BackColor = Color.Azure;
            this.colOvertime390.AppearanceCell.Options.UseBackColor = true;
            this.colOvertime390.AppearanceCell.Options.UseTextOptions = true;
            this.colOvertime390.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colOvertime390.AppearanceHeader.ForeColor = Color.Red;
            this.colOvertime390.AppearanceHeader.Options.UseForeColor = true;
            this.colOvertime390.Caption = "TCĐ. Ng\x00e0y lễ (h)";
            this.colOvertime390.ColumnEdit = this.repCal;
            this.colOvertime390.FieldName = "Overtime390";
            this.colOvertime390.Name = "colOvertime390";
            this.colOvertime390.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colOvertime390.OptionsColumn.ReadOnly = true;
            this.colOvertime390.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colOvertime390.Visible = true;
            this.colOvertimeTotal1.AppearanceCell.BackColor = Color.Azure;
            this.colOvertimeTotal1.AppearanceCell.Options.UseBackColor = true;
            this.colOvertimeTotal1.AppearanceCell.Options.UseTextOptions = true;
            this.colOvertimeTotal1.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colOvertimeTotal1.AppearanceHeader.ForeColor = Color.Blue;
            this.colOvertimeTotal1.AppearanceHeader.Options.UseForeColor = true;
            this.colOvertimeTotal1.Caption = "Tổng (h)";
            this.colOvertimeTotal1.ColumnEdit = this.repCal;
            this.colOvertimeTotal1.FieldName = "OvertimeTotal1";
            this.colOvertimeTotal1.Name = "colOvertimeTotal1";
            this.colOvertimeTotal1.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colOvertimeTotal1.OptionsColumn.ReadOnly = true;
            this.colOvertimeTotal1.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colOvertimeTotal1.Visible = true;
            this.gridBand4.Columns.Add(this.colPrivateHour);
            this.gridBand4.Columns.Add(this.colNightHour);
            this.gridBand4.Columns.Add(this.colNightDutyDay);
            this.gridBand4.Columns.Add(this.colExtraHour);
            this.gridBand4.Name = "gridBand4";
            this.gridBand4.Width = 300;
            this.colPrivateHour.AppearanceCell.BackColor = Color.Azure;
            this.colPrivateHour.AppearanceCell.Options.UseBackColor = true;
            this.colPrivateHour.AppearanceCell.Options.UseTextOptions = true;
            this.colPrivateHour.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colPrivateHour.AppearanceHeader.ForeColor = Color.Blue;
            this.colPrivateHour.AppearanceHeader.Options.UseForeColor = true;
            this.colPrivateHour.Caption = "Việc ri\x00eang (h)";
            this.colPrivateHour.ColumnEdit = this.repCal;
            this.colPrivateHour.FieldName = "PrivateHour";
            this.colPrivateHour.Name = "colPrivateHour";
            this.colPrivateHour.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colPrivateHour.OptionsColumn.ReadOnly = true;
            this.colPrivateHour.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colPrivateHour.Visible = true;
            this.colNightHour.AppearanceCell.BackColor = Color.SeaShell;
            this.colNightHour.AppearanceCell.Options.UseBackColor = true;
            this.colNightHour.AppearanceCell.Options.UseTextOptions = true;
            this.colNightHour.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colNightHour.AppearanceHeader.ForeColor = Color.Red;
            this.colNightHour.AppearanceHeader.Options.UseForeColor = true;
            this.colNightHour.Caption = "L\x00e0m đ\x00eam (h)";
            this.colNightHour.ColumnEdit = this.repCal;
            this.colNightHour.FieldName = "NightHour";
            this.colNightHour.Name = "colNightHour";
            this.colNightHour.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colNightHour.OptionsColumn.ReadOnly = true;
            this.colNightHour.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colNightHour.Visible = true;
            this.colNightDutyDay.AppearanceCell.BackColor = Color.SeaShell;
            this.colNightDutyDay.AppearanceCell.Options.UseBackColor = true;
            this.colNightDutyDay.AppearanceCell.Options.UseTextOptions = true;
            this.colNightDutyDay.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colNightDutyDay.AppearanceHeader.ForeColor = Color.Red;
            this.colNightDutyDay.AppearanceHeader.Options.UseForeColor = true;
            this.colNightDutyDay.Caption = "Trực đ\x00eam (d)";
            this.colNightDutyDay.ColumnEdit = this.repCal;
            this.colNightDutyDay.FieldName = "NightDutyDay";
            this.colNightDutyDay.Name = "colNightDutyDay";
            this.colNightDutyDay.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colNightDutyDay.OptionsColumn.ReadOnly = true;
            this.colNightDutyDay.SummaryItem.FieldName = "NightDay";
            this.colNightDutyDay.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colNightDutyDay.Visible = true;
            this.colExtraHour.AppearanceCell.BackColor = Color.SeaShell;
            this.colExtraHour.AppearanceCell.Options.UseBackColor = true;
            this.colExtraHour.AppearanceCell.Options.UseTextOptions = true;
            this.colExtraHour.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colExtraHour.AppearanceHeader.ForeColor = Color.Red;
            this.colExtraHour.AppearanceHeader.Options.UseForeColor = true;
            this.colExtraHour.Caption = "Tăng cường (h)";
            this.colExtraHour.ColumnEdit = this.repCal;
            this.colExtraHour.FieldName = "ExtraHour";
            this.colExtraHour.Name = "colExtraHour";
            this.colExtraHour.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colExtraHour.OptionsColumn.ReadOnly = true;
            this.colExtraHour.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colExtraHour.Visible = true;
            this.colDescription.Caption = "Ghi ch\x00fa";
            this.colDescription.FieldName = "Description";
            this.colDescription.Name = "colDescription";
            this.colDescription.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDescription.OptionsColumn.ReadOnly = true;
            this.colDescription.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDescription.Width = 0x91;
            this.panelControl1.BorderStyle = BorderStyles.NoBorder;
            this.panelControl1.Controls.Add(this.flowLayoutPanel3);
            this.panelControl1.Controls.Add(this.flowLayoutPanel2);
            this.panelControl1.Controls.Add(this.flowLayoutPanel1);
            this.panelControl1.Controls.Add(this.lbMessage);
            this.panelControl1.Dock = DockStyle.Top;
            this.panelControl1.Location = new Point(0x13, 0x1a);
            this.panelControl1.Name = "panelControl1";
            this.panelControl1.Size = new Size(0x49d, 0x2f);
            this.panelControl1.TabIndex = 8;
            this.panelControl1.Paint += new PaintEventHandler(this.panelControl1_Paint);
            this.flowLayoutPanel3.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.flowLayoutPanel3.Controls.Add(this.xucExpandCollapseButton1);
            this.flowLayoutPanel3.Controls.Add(this.lbGroupName);
            this.flowLayoutPanel3.Controls.Add(this.lbDepartmentName);
            this.flowLayoutPanel3.FlowDirection = FlowDirection.RightToLeft;
            this.flowLayoutPanel3.Location = new Point(0x2e3, 0x16);
            this.flowLayoutPanel3.Name = "flowLayoutPanel3";
            this.flowLayoutPanel3.Size = new Size(0x1b7, 0x15);
            this.flowLayoutPanel3.TabIndex = 8;
            this.xucExpandCollapseButton1.Location = new Point(0x1a3, 3);
            this.xucExpandCollapseButton1.Name = "xucExpandCollapseButton1";
            this.xucExpandCollapseButton1.Size = new Size(0x11, 15);
            this.xucExpandCollapseButton1.TabIndex = 5;
            this.xucExpandCollapseButton1.ExpandCollapsed += new xucExpandCollapseButton.ExpandCollapsedHander(this.xucExpandCollapseButton1_ExpandCollapsed);
            this.lbGroupName.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.lbGroupName.Location = new Point(0x15b, 3);
            this.lbGroupName.Name = "lbGroupName";
            this.lbGroupName.Size = new Size(0x42, 13);
            this.lbGroupName.TabIndex = 4;
            this.lbGroupName.Text = " - GroupName";
            this.lbDepartmentName.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.lbDepartmentName.Location = new Point(0x101, 3);
            this.lbDepartmentName.Name = "lbDepartmentName";
            this.lbDepartmentName.Size = new Size(0x54, 13);
            this.lbDepartmentName.TabIndex = 3;
            this.lbDepartmentName.Text = "DepartmentName";
            this.flowLayoutPanel2.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.flowLayoutPanel2.Controls.Add(this.lbBranchName);
            this.flowLayoutPanel2.Controls.Add(this.lbCompanyName);
            this.flowLayoutPanel2.FlowDirection = FlowDirection.RightToLeft;
            this.flowLayoutPanel2.Location = new Point(0x2e3, 1);
            this.flowLayoutPanel2.Name = "flowLayoutPanel2";
            this.flowLayoutPanel2.Size = new Size(0x1b7, 0x12);
            this.flowLayoutPanel2.TabIndex = 7;
            this.lbBranchName.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.lbBranchName.Appearance.Font = new Font("Tahoma", 9f, FontStyle.Bold);
            this.lbBranchName.Appearance.Options.UseFont = true;
            this.lbBranchName.Location = new Point(0x15c, 3);
            this.lbBranchName.Name = "lbBranchName";
            this.lbBranchName.Size = new Size(0x58, 14);
            this.lbBranchName.TabIndex = 2;
            this.lbBranchName.Text = " - BranchName";
            this.lbCompanyName.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.lbCompanyName.Appearance.Font = new Font("Tahoma", 9f, FontStyle.Bold);
            this.lbCompanyName.Appearance.Options.UseFont = true;
            this.lbCompanyName.Location = new Point(0xfc, 3);
            this.lbCompanyName.Name = "lbCompanyName";
            this.lbCompanyName.Size = new Size(90, 14);
            this.lbCompanyName.TabIndex = 1;
            this.lbCompanyName.Text = "CompanyName";
            this.flowLayoutPanel1.Controls.Add(this.lbTimeKeeperOverTimeName);
            this.flowLayoutPanel1.Controls.Add(this.ptLock);
            this.flowLayoutPanel1.Controls.Add(this.ptFinish);
            this.flowLayoutPanel1.Location = new Point(4, 4);
            this.flowLayoutPanel1.Name = "flowLayoutPanel1";
            this.flowLayoutPanel1.Size = new Size(0x192, 0x13);
            this.flowLayoutPanel1.TabIndex = 4;
            this.lbTimeKeeperOverTimeName.Appearance.Font = new Font("Tahoma", 9f, FontStyle.Bold);
            this.lbTimeKeeperOverTimeName.Appearance.Options.UseFont = true;
            this.lbTimeKeeperOverTimeName.Location = new Point(3, 3);
            this.lbTimeKeeperOverTimeName.Name = "lbTimeKeeperOverTimeName";
            this.lbTimeKeeperOverTimeName.Size = new Size(0x14b, 14);
            this.lbTimeKeeperOverTimeName.TabIndex = 0;
            this.lbTimeKeeperOverTimeName.Text = "[Vui l\x00f2ng chọn bảng tổng hợp ng\x00e0y c\x00f4ng ở ph\x00eda tr\x00ean]";
            this.ptLock.Image = MsgResc.lock_open__1_;
            this.ptLock.Location = new Point(0x155, 0);
            this.ptLock.Margin = new Padding(4, 0, 0, 0);
            this.ptLock.Name = "ptLock";
            this.ptLock.Size = new Size(0x10, 0x10);
            this.ptLock.TabIndex = 10;
            this.ptLock.TabStop = false;
            this.ptLock.Visible = false;
            this.ptFinish.Image = MsgResc.check;
            this.ptFinish.Location = new Point(0x169, 0);
            this.ptFinish.Margin = new Padding(4, 0, 0, 0);
            this.ptFinish.Name = "ptFinish";
            this.ptFinish.Size = new Size(0x13, 0x10);
            this.ptFinish.TabIndex = 11;
            this.ptFinish.TabStop = false;
            this.ptFinish.Visible = false;
            this.lbMessage.Appearance.ForeColor = Color.DarkBlue;
            this.lbMessage.Appearance.Options.UseForeColor = true;
            this.lbMessage.Location = new Point(4, 0x1a);
            this.lbMessage.Name = "lbMessage";
            this.lbMessage.Size = new Size(0x1e4, 13);
            this.lbMessage.TabIndex = 2;
            this.lbMessage.Text = "[Nếu danh s\x00e1ch l\x00e0 trống bạn c\x00f3 thể nhấn v\x00e0o n\x00fat kế b\x00ean khung chọn để ph\x00e1t sinh dữ liệu chấm c\x00f4ng]";
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.Controls.Add(this.gcList);
            base.Controls.Add(this.panelControl1);
            base.Controls.Add(this.hideContainerLeft);
            base.Controls.Add(this.barDockControlLeft);
            base.Controls.Add(this.barDockControlRight);
            base.Controls.Add(this.barDockControlBottom);
            base.Controls.Add(this.barDockControlTop);
            base.Name = "xucTimekeeperTotal";
            base.Size = new Size(0x4b0, 0x272);
            this.barManager1.EndInit();
            this.repTimeKeeperList.EndInit();
            this.repositoryItemGridLookUpEdit2View.EndInit();
            this.repYear.EndInit();
            this.dockManager1.EndInit();
            this.hideContainerLeft.ResumeLayout(false);
            this.dockPanel1.ResumeLayout(false);
            this.dockPanel1_Container.ResumeLayout(false);
            this.imageCollection2.EndInit();
            this.gcList.EndInit();
            this.gbList.EndInit();
            this.repCal.EndInit();
            this.panelControl1.EndInit();
            this.panelControl1.ResumeLayout(false);
            this.panelControl1.PerformLayout();
            this.flowLayoutPanel3.ResumeLayout(false);
            this.flowLayoutPanel3.PerformLayout();
            this.flowLayoutPanel2.ResumeLayout(false);
            this.flowLayoutPanel2.PerformLayout();
            this.flowLayoutPanel1.ResumeLayout(false);
            this.flowLayoutPanel1.PerformLayout();
            ((ISupportInitialize) this.ptLock).EndInit();
            ((ISupportInitialize) this.ptFinish).EndInit();
            base.ResumeLayout(false);
        }

        private void InitInterface()
        {
            if (!(this.m_IsLock || this.m_IsFinish))
            {
                this.bbiLock.Enabled = true;
                this.ptLock.Visible = false;
                this.bbiOpen.Enabled = true;
                this.bbiFinish.Enabled = true;
                this.ptFinish.Visible = false;
                this.bbiTotal.Enabled = true;
                this.lbMessage.Text = "Đ\x00e3 mở sổ - Bảng chấm c\x00f4ng được ph\x00e9p chỉnh sửa";
                this.GridViewOpen();
            }
            else if (!(!this.m_IsLock || this.m_IsFinish))
            {
                this.bbiLock.Enabled = false;
                this.ptLock.Visible = true;
                this.bbiOpen.Enabled = true;
                this.bbiFinish.Enabled = true;
                this.ptFinish.Visible = false;
                this.bbiTotal.Enabled = false;
                this.lbMessage.Text = "Đ\x00e3 kho\x00e1 sổ - Kh\x00f4ng được ph\x00e9p chỉnh sửa";
                this.GridViewLock();
            }
            else if (!(this.m_IsLock || !this.m_IsFinish))
            {
                this.bbiLock.Enabled = true;
                this.ptLock.Visible = false;
                this.bbiOpen.Enabled = false;
                this.bbiFinish.Enabled = false;
                this.ptFinish.Visible = true;
                this.bbiTotal.Enabled = false;
                this.lbMessage.Text = "Đ\x00e3 ho\x00e0n th\x00e0nh bảng chấm c\x00f4ng của th\x00e1ng n\x00e0y - Kh\x00f4ng được ph\x00e9p chỉnh sửa";
                this.GridViewLock();
            }
            else if (this.m_IsLock && this.m_IsFinish)
            {
                this.bbiLock.Enabled = false;
                this.ptLock.Visible = true;
                this.bbiOpen.Enabled = false;
                this.bbiFinish.Enabled = false;
                this.ptFinish.Visible = true;
                this.bbiTotal.Enabled = false;
                this.lbMessage.Text = "Đ\x00e3 ho\x00e0n th\x00e0nh bảng chấm c\x00f4ng của th\x00e1ng n\x00e0y - Kh\x00f4ng được ph\x00e9p chỉnh sửa";
                this.GridViewLock();
            }
            HRM_SALARY_TABLELIST hrm_salary_tablelist = new HRM_SALARY_TABLELIST();
            if (hrm_salary_tablelist.Exist(this.m_Month, this.m_Year))
            {
                hrm_salary_tablelist.Get(this.m_Month, this.m_Year);
                if (hrm_salary_tablelist.OvertimeSaturdayType == 0)
                {
                    this.colOvertime200.Caption = "TC. Chủ nhật (h)";
                    this.colOvertime260.Caption = "TCĐ. Chủ nhật (h)";
                }
                else
                {
                    this.colOvertime200.Caption = "TC. T7 & Chủ nhật (h)";
                    this.colOvertime260.Caption = "TCĐ. T7 & Chủ nhật (h)";
                }
            }
            else
            {
                DIC_SALARY_FORMULA dic_salary_formula = new DIC_SALARY_FORMULA();
                dic_salary_formula.Get();
                if (dic_salary_formula.OvertimeSaturdayType == 0)
                {
                    this.colOvertime200.Caption = "TC. Chủ nhật (h)";
                    this.colOvertime260.Caption = "TCĐ. Chủ nhật (h)";
                }
                else
                {
                    this.colOvertime200.Caption = "TC. T7 & Chủ nhật (h)";
                    this.colOvertime260.Caption = "TCĐ. T7 & Chủ nhật (h)";
                }
            }
        }

        public void LoadGrid(int Level, string Code)
        {
            try
            {
                Guid timeKeeperTableListID = this.m_TimeKeeperTableListID;
                this.gcList.DataSource = new HRM_TIMEKEEPER_TOTAL().GetList(Level, Code, timeKeeperTableListID);
            }
            catch
            {
            }
        }

        public void LoadTimeKeeperTableList()
        {
            new HRM_TIMEKEEPER_TABLELIST().AddRepositoryGridLookupEditByYear(this.repTimeKeeperList, this.m_Year);
        }

        private void panelControl1_Paint(object sender, PaintEventArgs e)
        {
        }

        private void RaiseClosedHandler()
        {
            if (this.Closed != null)
            {
                this.Closed(this);
            }
        }

        private void RaiseTimekeeperTableDeletedHander()
        {
            if (this.TimekeeperTableDeleted != null)
            {
                this.TimekeeperTableDeleted(this);
            }
        }

        private void RaiseTimekeeperTableInsertedHander()
        {
            if (this.TimekeeperTableInserted != null)
            {
                this.TimekeeperTableInserted(this);
            }
        }

        private void RaiseUnShiftDataHandler(int Month, int Year)
        {
            if (this.UnShiftData != null)
            {
                this.UnShiftData(this, Month, Year);
            }
        }

        private void repTimeKeeperList_ButtonClick(object sender, ButtonPressedEventArgs e)
        {
            xfmShiftAdd.UnShiftDataHandler handler = null;
            xfmShiftAdd.TimekeeperTableDeletedHandler handler2 = null;
            if (e.Button.Kind == ButtonPredefines.Glyph)
            {
                xfmShiftAdd add = new xfmShiftAdd();
                if (handler == null)
                {
                    handler = (s, m, y) => this.RaiseUnShiftDataHandler(m, y);
                }
                add.UnShiftData += handler;
                if (handler2 == null)
                {
                    handler2 = s => this.RaiseTimekeeperTableDeletedHander();
                }
                add.TimekeeperTableDeleted += handler2;
                add.ShowDialog();
            }
        }

        private void repTimeKeeperList_EditValueChanged(object sender, EventArgs e)
        {
            base.SetWaitDialogCaption("Đang khởi tạo dữ liệu...");
            HRM_TIMEKEEPER_TABLELIST hrm_timekeeper_tablelist = new HRM_TIMEKEEPER_TABLELIST();
            HRM_TIMEKEEPER_TOTAL hrm_timekeeper_total = new HRM_TIMEKEEPER_TOTAL();
            Guid timeKeeperTableListID = this.m_TimeKeeperTableListID;
            this.gcList.DataSource = hrm_timekeeper_total.GetList(MyLogin.Level, MyLogin.Code, timeKeeperTableListID);
            hrm_timekeeper_tablelist.GetByID(timeKeeperTableListID);
            this.m_Month = hrm_timekeeper_tablelist.Month;
            this.m_Year = hrm_timekeeper_tablelist.Year;
            this.lbTimeKeeperOverTimeName.Text = "Bảng Tổng Hợp Ng\x00e0y C\x00f4ng Th\x00e1ng " + this.m_Month.ToString() + " - " + this.m_Year.ToString();
            this.m_IsLock = hrm_timekeeper_tablelist.IsLock;
            this.m_IsFinish = hrm_timekeeper_tablelist.IsFinish;
            this.InitInterface();
            this.DoHide();
        }

        private void repTimeKeeperList_EditValueChanging(object sender, ChangingEventArgs e)
        {
            this.m_TimeKeeperTableListID = new Guid(e.NewValue.ToString());
        }

        private void Total()
        {
            base.SetWaitDialogCaption("Đang tổng hợp dữ liệu...");
            new HRM_TIMEKEEPER_TOTAL().Create(this.m_Level, this.m_Code, this.m_TimeKeeperTableListID);
            this.LoadGrid(this.m_Level, this.m_Code);
            this.DoHide();
        }

        private void xucExpandCollapseButton1_ExpandCollapsed(object sender, bool IsExpand)
        {
            if (IsExpand)
            {
                this.gbList.OptionsView.ShowGroupPanel = true;
            }
            else
            {
                this.gbList.OptionsView.ShowGroupPanel = false;
            }
        }

        public delegate void ClosedHandler(object sender);

        public delegate void TimekeeperTableDeletedHandler(object sender);

        public delegate void TimekeeperTableInsertedHandler(object sender);

        public delegate void UnShiftDataHandler(object sender, int Month, int Year);
    }
}

